//#Author:bin
// -*- charset = utf-8 -*-
// @time:2022/8/25 9:35
// @Author:bfl91
// @file : Popular.js
// @Software:WebStorm
import {getBanar,getCatitems,getFloorData} from "@/api/getfun";
export default {
    namespaced:true,
    state: {
        BanerList:[],//轮播图
        navList:[],//导航栏,
        FloorList:[]//楼层数据
    },
    getters: {

    },
    mutations: {
        setBaner(state,list){
                state.BanerList=list;
        },
        setNav(state,list){
            state.navList=list;
        },
        setFloor(state,list){
            state.FloorList=list;
        }
        },
    actions: {
        getBanarList(contxt){
            getBanar().then(res=>{
                let {message}=res.data
                contxt.commit('setBaner',message)
            })
        },
        getNavList(contxt){
            getCatitems().then(res=>{
                let {message}=res.data
                contxt.commit('setNav',message)
            })
        },
        getFloorList(contxt){
            getFloorData().then(res=>{
                // console.log(res)
            })
        }

    },
}